\(\int (d+e x) (9+12 x+4 x^2)^p \, dx\) [1758]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 60 \[ \int (d+e x) \left (9+12 x+4 x^2\right )^p \, dx=\frac {(2 d-3 e) (3+2 x) \left (9+12 x+4 x^2\right )^p}{4 (1+2 p)}+\frac {e \left (9+12 x+4 x^2\right )^{1+p}}{8 (1+p)} \]

[Out]

1/4*(2*d-3*e)*(3+2*x)*(4*x^2+12*x+9)^p/(1+2*p)+1/8*e*(4*x^2+12*x+9)^(p+1)/(p+1)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {654, 623} \[ \int (d+e x) \left (9+12 x+4 x^2\right )^p \, dx=\frac {(2 x+3) (2 d-3 e) \left (4 x^2+12 x+9\right )^p}{4 (2 p+1)}+\frac {e \left (4 x^2+12 x+9\right )^{p+1}}{8 (p+1)} \]

[In]

Int[(d + e*x)*(9 + 12*x + 4*x^2)^p,x]

[Out]

((2*d - 3*e)*(3 + 2*x)*(9 + 12*x + 4*x^2)^p)/(4*(1 + 2*p)) + (e*(9 + 12*x + 4*x^2)^(1 + p))/(8*(1 + p))

Rule 623

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^p/(2*c*(2*p + 1)
)), x] /; FreeQ[{a, b, c, p}, x] && EqQ[b^2 - 4*a*c, 0] && NeQ[p, -2^(-1)]

Rule 654

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*((a + b*x + c*x^2)^(p +
 1)/(2*c*(p + 1))), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {e \left (9+12 x+4 x^2\right )^{1+p}}{8 (1+p)}+\frac {1}{2} (2 d-3 e) \int \left (9+12 x+4 x^2\right )^p \, dx \\ & = \frac {(2 d-3 e) (3+2 x) \left (9+12 x+4 x^2\right )^p}{4 (1+2 p)}+\frac {e \left (9+12 x+4 x^2\right )^{1+p}}{8 (1+p)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.80 \[ \int (d+e x) \left (9+12 x+4 x^2\right )^p \, dx=\frac {(3+2 x) \left ((3+2 x)^2\right )^p (4 d (1+p)+e (-3+(2+4 p) x))}{8 (1+p) (1+2 p)} \]

[In]

Integrate[(d + e*x)*(9 + 12*x + 4*x^2)^p,x]

[Out]

((3 + 2*x)*((3 + 2*x)^2)^p*(4*d*(1 + p) + e*(-3 + (2 + 4*p)*x)))/(8*(1 + p)*(1 + 2*p))

Maple [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3.

Time = 2.19 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.72

method result size
meijerg \(\frac {e 3^{2 p} x^{2} {}_{2}^{}{\moversetsp {}{\mundersetsp {}{F_{1}^{}}}}\left (2,-2 p ;3;-\frac {2 x}{3}\right )}{2}+d 3^{2 p} x {}_{2}^{}{\moversetsp {}{\mundersetsp {}{F_{1}^{}}}}\left (1,-2 p ;2;-\frac {2 x}{3}\right )\) \(43\)
gosper \(\frac {\left (4 x^{2}+12 x +9\right )^{p} \left (4 e p x +4 d p +2 e x +4 d -3 e \right ) \left (2 x +3\right )}{16 p^{2}+24 p +8}\) \(52\)
risch \(\frac {\left (8 e p \,x^{2}+8 d p x +12 e p x +4 e \,x^{2}+12 d p +8 d x +12 d -9 e \right ) \left (\left (2 x +3\right )^{2}\right )^{p}}{8 \left (1+p \right ) \left (1+2 p \right )}\) \(62\)
norman \(\frac {3 \left (4 d p +4 d -3 e \right ) {\mathrm e}^{p \ln \left (4 x^{2}+12 x +9\right )}}{8 \left (2 p^{2}+3 p +1\right )}+\frac {e \,x^{2} {\mathrm e}^{p \ln \left (4 x^{2}+12 x +9\right )}}{2+2 p}+\frac {\left (2 d p +3 p e +2 d \right ) x \,{\mathrm e}^{p \ln \left (4 x^{2}+12 x +9\right )}}{4 p^{2}+6 p +2}\) \(107\)
parallelrisch \(\frac {8 x^{2} \left (4 x^{2}+12 x +9\right )^{p} e p +4 x^{2} \left (4 x^{2}+12 x +9\right )^{p} e +8 x \left (4 x^{2}+12 x +9\right )^{p} d p +12 x \left (4 x^{2}+12 x +9\right )^{p} e p +8 x \left (4 x^{2}+12 x +9\right )^{p} d +12 \left (4 x^{2}+12 x +9\right )^{p} d p +12 \left (4 x^{2}+12 x +9\right )^{p} d -9 e \left (4 x^{2}+12 x +9\right )^{p}}{16 p^{2}+24 p +8}\) \(149\)

[In]

int((e*x+d)*(4*x^2+12*x+9)^p,x,method=_RETURNVERBOSE)

[Out]

1/2*e*3^(2*p)*x^2*hypergeom([2,-2*p],[3],-2/3*x)+d*3^(2*p)*x*hypergeom([1,-2*p],[2],-2/3*x)

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.07 \[ \int (d+e x) \left (9+12 x+4 x^2\right )^p \, dx=\frac {{\left (4 \, {\left (2 \, e p + e\right )} x^{2} + 12 \, d p + 4 \, {\left ({\left (2 \, d + 3 \, e\right )} p + 2 \, d\right )} x + 12 \, d - 9 \, e\right )} {\left (4 \, x^{2} + 12 \, x + 9\right )}^{p}}{8 \, {\left (2 \, p^{2} + 3 \, p + 1\right )}} \]

[In]

integrate((e*x+d)*(4*x^2+12*x+9)^p,x, algorithm="fricas")

[Out]

1/8*(4*(2*e*p + e)*x^2 + 12*d*p + 4*((2*d + 3*e)*p + 2*d)*x + 12*d - 9*e)*(4*x^2 + 12*x + 9)^p/(2*p^2 + 3*p +
1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 321 vs. \(2 (49) = 98\).

Time = 0.81 (sec) , antiderivative size = 321, normalized size of antiderivative = 5.35 \[ \int (d+e x) \left (9+12 x+4 x^2\right )^p \, dx=\begin {cases} - \frac {2 d}{8 x + 12} + \frac {2 e x \log {\left (x + \frac {3}{2} \right )}}{8 x + 12} + \frac {3 e \log {\left (x + \frac {3}{2} \right )}}{8 x + 12} + \frac {3 e}{8 x + 12} & \text {for}\: p = -1 \\\frac {e \sqrt {4 x^{2} + 12 x + 9}}{4} + \frac {\left (d - \frac {3 e}{2}\right ) \left (x + \frac {3}{2}\right ) \log {\left (x + \frac {3}{2} \right )}}{2 \sqrt {\left (x + \frac {3}{2}\right )^{2}}} & \text {for}\: p = - \frac {1}{2} \\\frac {8 d p x \left (4 x^{2} + 12 x + 9\right )^{p}}{16 p^{2} + 24 p + 8} + \frac {12 d p \left (4 x^{2} + 12 x + 9\right )^{p}}{16 p^{2} + 24 p + 8} + \frac {8 d x \left (4 x^{2} + 12 x + 9\right )^{p}}{16 p^{2} + 24 p + 8} + \frac {12 d \left (4 x^{2} + 12 x + 9\right )^{p}}{16 p^{2} + 24 p + 8} + \frac {8 e p x^{2} \left (4 x^{2} + 12 x + 9\right )^{p}}{16 p^{2} + 24 p + 8} + \frac {12 e p x \left (4 x^{2} + 12 x + 9\right )^{p}}{16 p^{2} + 24 p + 8} + \frac {4 e x^{2} \left (4 x^{2} + 12 x + 9\right )^{p}}{16 p^{2} + 24 p + 8} - \frac {9 e \left (4 x^{2} + 12 x + 9\right )^{p}}{16 p^{2} + 24 p + 8} & \text {otherwise} \end {cases} \]

[In]

integrate((e*x+d)*(4*x**2+12*x+9)**p,x)

[Out]

Piecewise((-2*d/(8*x + 12) + 2*e*x*log(x + 3/2)/(8*x + 12) + 3*e*log(x + 3/2)/(8*x + 12) + 3*e/(8*x + 12), Eq(
p, -1)), (e*sqrt(4*x**2 + 12*x + 9)/4 + (d - 3*e/2)*(x + 3/2)*log(x + 3/2)/(2*sqrt((x + 3/2)**2)), Eq(p, -1/2)
), (8*d*p*x*(4*x**2 + 12*x + 9)**p/(16*p**2 + 24*p + 8) + 12*d*p*(4*x**2 + 12*x + 9)**p/(16*p**2 + 24*p + 8) +
 8*d*x*(4*x**2 + 12*x + 9)**p/(16*p**2 + 24*p + 8) + 12*d*(4*x**2 + 12*x + 9)**p/(16*p**2 + 24*p + 8) + 8*e*p*
x**2*(4*x**2 + 12*x + 9)**p/(16*p**2 + 24*p + 8) + 12*e*p*x*(4*x**2 + 12*x + 9)**p/(16*p**2 + 24*p + 8) + 4*e*
x**2*(4*x**2 + 12*x + 9)**p/(16*p**2 + 24*p + 8) - 9*e*(4*x**2 + 12*x + 9)**p/(16*p**2 + 24*p + 8), True))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.08 \[ \int (d+e x) \left (9+12 x+4 x^2\right )^p \, dx=\frac {{\left (4 \, {\left (2 \, p + 1\right )} x^{2} + 12 \, p x - 9\right )} e {\left (2 \, x + 3\right )}^{2 \, p}}{8 \, {\left (2 \, p^{2} + 3 \, p + 1\right )}} + \frac {d {\left (2 \, x + 3\right )}^{2 \, p} {\left (2 \, x + 3\right )}}{2 \, {\left (2 \, p + 1\right )}} \]

[In]

integrate((e*x+d)*(4*x^2+12*x+9)^p,x, algorithm="maxima")

[Out]

1/8*(4*(2*p + 1)*x^2 + 12*p*x - 9)*e*(2*x + 3)^(2*p)/(2*p^2 + 3*p + 1) + 1/2*d*(2*x + 3)^(2*p)*(2*x + 3)/(2*p
+ 1)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 148 vs. \(2 (56) = 112\).

Time = 0.28 (sec) , antiderivative size = 148, normalized size of antiderivative = 2.47 \[ \int (d+e x) \left (9+12 x+4 x^2\right )^p \, dx=\frac {8 \, {\left (4 \, x^{2} + 12 \, x + 9\right )}^{p} e p x^{2} + 8 \, {\left (4 \, x^{2} + 12 \, x + 9\right )}^{p} d p x + 12 \, {\left (4 \, x^{2} + 12 \, x + 9\right )}^{p} e p x + 4 \, {\left (4 \, x^{2} + 12 \, x + 9\right )}^{p} e x^{2} + 12 \, {\left (4 \, x^{2} + 12 \, x + 9\right )}^{p} d p + 8 \, {\left (4 \, x^{2} + 12 \, x + 9\right )}^{p} d x + 12 \, {\left (4 \, x^{2} + 12 \, x + 9\right )}^{p} d - 9 \, {\left (4 \, x^{2} + 12 \, x + 9\right )}^{p} e}{8 \, {\left (2 \, p^{2} + 3 \, p + 1\right )}} \]

[In]

integrate((e*x+d)*(4*x^2+12*x+9)^p,x, algorithm="giac")

[Out]

1/8*(8*(4*x^2 + 12*x + 9)^p*e*p*x^2 + 8*(4*x^2 + 12*x + 9)^p*d*p*x + 12*(4*x^2 + 12*x + 9)^p*e*p*x + 4*(4*x^2
+ 12*x + 9)^p*e*x^2 + 12*(4*x^2 + 12*x + 9)^p*d*p + 8*(4*x^2 + 12*x + 9)^p*d*x + 12*(4*x^2 + 12*x + 9)^p*d - 9
*(4*x^2 + 12*x + 9)^p*e)/(2*p^2 + 3*p + 1)

Mupad [B] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.45 \[ \int (d+e x) \left (9+12 x+4 x^2\right )^p \, dx=\left (\frac {12\,d-9\,e+12\,d\,p}{16\,p^2+24\,p+8}+\frac {x\,\left (8\,d+8\,d\,p+12\,e\,p\right )}{16\,p^2+24\,p+8}+\frac {4\,e\,x^2\,\left (2\,p+1\right )}{16\,p^2+24\,p+8}\right )\,{\left (4\,x^2+12\,x+9\right )}^p \]

[In]

int((d + e*x)*(12*x + 4*x^2 + 9)^p,x)

[Out]

((12*d - 9*e + 12*d*p)/(24*p + 16*p^2 + 8) + (x*(8*d + 8*d*p + 12*e*p))/(24*p + 16*p^2 + 8) + (4*e*x^2*(2*p +
1))/(24*p + 16*p^2 + 8))*(12*x + 4*x^2 + 9)^p